﻿<%@ Page Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true"
    CodeBehind="TestTemplate.aspx.cs" Inherits="EXAM.Admin.Page_Admin.TestTemplate" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .RadInput_Default
        {
            font: 12px "segoe ui" ,arial,sans-serif;
        }
        .RadInput
        {
            vertical-align: middle;
        }
        .RadInput_Default
        {
            font: 12px "segoe ui" ,arial,sans-serif;
        }
        .RadInput
        {
            vertical-align: middle;
        }
        .RadInput_Default
        {
            font: 12px "segoe ui" ,arial,sans-serif;
        }
        .RadInput
        {
            vertical-align: middle;
        }
        .RadInput_Default
        {
            font: 12px "segoe ui" ,arial,sans-serif;
        }
        .RadInput
        {
            vertical-align: middle;
        }
        .RadInput_Default
        {
            font: 12px "segoe ui" ,arial,sans-serif;
        }
        .RadInput
        {
            vertical-align: middle;
        }
        .RadInput_Default
        {
            font: 12px "segoe ui" ,arial,sans-serif;
        }
        .RadInput
        {
            vertical-align: middle;
        }
        .RadInput_Default
        {
            font: 12px "segoe ui" ,arial,sans-serif;
        }
        .RadInput
        {
            vertical-align: middle;
        }
        .RadInput_Default
        {
            font: 12px "segoe ui" ,arial,sans-serif;
        }
        .RadInput
        {
            vertical-align: middle;
        }
        .RadInput_Default
        {
            font: 12px "segoe ui" ,arial,sans-serif;
        }
        .RadInput
        {
            vertical-align: middle;
        }
        .RadInput_Default
        {
            font: 12px "segoe ui" ,arial,sans-serif;
        }
        .RadInput
        {
            vertical-align: middle;
        }
        .RadInput_Default
        {
            font: 12px "segoe ui" ,arial,sans-serif;
        }
        .RadInput
        {
            vertical-align: middle;
        }
        .RadInput_Default
        {
            font: 12px "segoe ui" ,arial,sans-serif;
        }
        .RadInput
        {
            vertical-align: middle;
        }
        .RadInput_Default
        {
            font: 12px "segoe ui" ,arial,sans-serif;
        }
        .RadInput
        {
            vertical-align: middle;
        }
        .RadPicker .RadInput
        {
            vertical-align: baseline;
        }
        .RadPicker .RadInput
        {
            vertical-align: baseline;
        }
        .RadPicker .RadInput
        {
            vertical-align: baseline;
        }
        .RadPicker .RadInput
        {
            vertical-align: baseline;
        }
        .RadGrid_Office2007 .rgHeader
        {
            color: #00156e;
        }
        .RadGrid_Office2007 .rgHeader
        {
            border: solid #5d8cc9;
            border-width: 0 0 1px 1px;
            background: 0 -2300px repeat-x #c3d8f1 url(                              'mvwres://Telerik.Web.UI, Version=2010.3.1317.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4/Telerik.Web.UI.Skins.Office2007.Grid.sprite.gif' );
        }
        .RadGrid .rgHeader
        {
            padding-top: 5px;
            padding-bottom: 4px;
            text-align: left;
            font-weight: normal;
        }
        .RadGrid .rgHeader
        {
            padding-left: 7px;
            padding-right: 7px;
        }
        .RadGrid .rgHeader
        {
            cursor: default;
        }
        .RadGrid_Office2007 .rgFilterRow
        {
            background: #d6e5f3;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlacebody" runat="server">
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="dgvList">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="dgvList" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <table cellpadding="0" cellspacing="0" border="0" width="100%">
        <tr>
            <td align="center" class="formTitle">
                Template Management -
                <asp:Literal ID="lbTitle" runat="server"></asp:Literal>
            </td>
        </tr>
        <tr>
            <td>
                <telerik:RadTextBox ID="txtID" runat="server" Visible="False">
                </telerik:RadTextBox>
                <telerik:RadTextBox ID="txtNo" runat="server" Visible="False">
                </telerik:RadTextBox>
                <asp:HiddenField ID="hdType" runat="server" />
                <div style="width: 100%">
                    <telerik:RadButton ID="btnSave" runat="server" OnClick="btnSave_Click" Text="Save">
                    </telerik:RadButton>
                    <telerik:RadButton ID="btnCancel" runat="server" OnClick="btnCancel_Click" Text="Cancel">
                    </telerik:RadButton>
                </div>
                <telerik:RadSplitter ID="RadSplitter1" runat="server" Width="100%">
                    <telerik:RadPane ID="RadPane1" runat="server" Width="70%"><telerik:RadWindow ID="Win_ViewReport" runat="server" Width="403px" Height="536"
                            VisibleOnPageLoad="true" Behaviors="Minimize, Move, Resize, Maximize" OffsetElementID="RadGrid1"
                            Left="750px" EnableShadow="true" InitialBehaviors="Minimize" Title="Generate Test"
                            Top="150px"><ContentTemplate><div align="center"><asp:GridView ID="dgvANAL" runat="server" AutoGenerateColumns="False" CellPadding="4"
                                        DataKeyNames="Code" ForeColor="#333333" GridLines="None" OnRowDataBound="dgvANAL_RowDataBound"><RowStyle BackColor="#F7F6F3" ForeColor="#333333" /><Columns><asp:BoundField DataField="CODE" HeaderText="Code" /><asp:TemplateField HeaderText="Level 1"><ItemTemplate><telerik:RadNumericTextBox ID="txtNum1" runat="server" Value="0" MinValue="0" Width="70px"
                                                        NumberFormat-DecimalDigits="0"></telerik:RadNumericTextBox></ItemTemplate></asp:TemplateField><asp:TemplateField HeaderText="Level 2"><ItemTemplate><telerik:RadNumericTextBox ID="txtNum2" runat="server" Value="0" MinValue="0" Width="70px"
                                                        NumberFormat-DecimalDigits="0"></telerik:RadNumericTextBox></ItemTemplate></asp:TemplateField><asp:TemplateField HeaderText="Level 3"><ItemTemplate><telerik:RadNumericTextBox ID="txtNum3" runat="server" Value="0" MinValue="0" Width="70px"
                                                        NumberFormat-DecimalDigits="0"></telerik:RadNumericTextBox></ItemTemplate></asp:TemplateField></Columns><FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" /><PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" /><SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" /><HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" /><EditRowStyle BackColor="#999999" /><AlternatingRowStyle BackColor="White" ForeColor="#284775" /></asp:GridView><telerik:RadButton ID="btnOK" runat="server" Text="Run" Width="100px" OnClick="btnOK_Click"></telerik:RadButton></div></ContentTemplate></telerik:RadWindow><telerik:RadGrid ID="dgvList" runat="server" AutoGenerateColumns="False" GridLines="None"
                            Skin="Office2007" AllowMultiRowSelection="True" AllowPaging="True" AllowSorting="True"
                            ShowGroupPanel="True" OnNeedDataSource="dgvList_NeedDataSource" DataMember="dtQuest"
                            OnItemCommand="dgvList_ItemCommand"><HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Office2007"></HeaderContextMenu><GroupPanel Text="Drag a column header here to group by"></GroupPanel><MasterTableView PageSize="20" DataKeyNames="Line" DataMember="dtQuest" EditMode="InPlace"><DetailTables><telerik:GridTableView runat="server" DataKeyNames="Test_Log_Line,Answer_ID" DataMember="dtAnswer"
                                        AllowPaging="False"><ParentTableRelation><telerik:GridRelationFields DetailKeyField="Test_Log_Line" MasterKeyField="Line" /></ParentTableRelation><CommandItemSettings ExportToPdfText="Export to Pdf" /><RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"><HeaderStyle Width="20px" /></RowIndicatorColumn><ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"><HeaderStyle Width="20px" /></ExpandCollapseColumn><Columns><telerik:GridBoundColumn 
                            DataField="Test_Log_Line" FilterControlAltText="Filter column1 column"
                                                UniqueName="column1" Visible="False" 
                            DataType="System.Boolean"></telerik:GridBoundColumn><telerik:GridBoundColumn DataField="Answer_ID" FilterControlAltText="Filter column2 column"
                                                HeaderText="AnswerID" UniqueName="column2" Visible="False"></telerik:GridBoundColumn><telerik:GridBoundColumn DataField="Rank" FilterControlAltText="Filter column3 column"
                                                HeaderText="Rank" UniqueName="column3"></telerik:GridBoundColumn><telerik:GridBoundColumn 
                            DataField="AnsName" FilterControlAltText="Filter column column"
                                                HeaderText="Answer Name" UniqueName="column4"></telerik:GridBoundColumn><telerik:GridBoundColumn 
                            DataField="Answer_Selected" FilterControlAltText="Filter column column" 
                            HeaderText="Is Right" UniqueName="column">
                        </telerik:GridBoundColumn>
                    </Columns><EditFormSettings><EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn></EditFormSettings></telerik:GridTableView></DetailTables><CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings><RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"><HeaderStyle Width="20px"></HeaderStyle></RowIndicatorColumn><ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column" Visible="True"><HeaderStyle Width="20px"></HeaderStyle></ExpandCollapseColumn><Columns><telerik:GridEditCommandColumn ButtonType="ImageButton" 
                                        FilterControlAltText="Filter EditCommandColumn column" Visible="False"><ItemStyle CssClass="MyImageButton" /></telerik:GridEditCommandColumn><telerik:GridBoundColumn DataField="No" FilterControlAltText="Filter column column"
                                        HeaderText="No" UniqueName="column110" Visible="False"></telerik:GridBoundColumn><telerik:GridBoundColumn DataField="Line" FilterControlAltText="Filter column1 column"
                                        HeaderText="Line" ReadOnly="True" UniqueName="column111"><HeaderStyle Width="15px" /><ItemStyle Width="15px" /></telerik:GridBoundColumn><telerik:GridBoundColumn DataField="Test_ID" FilterControlAltText="Filter column2 column"
                                        HeaderText="TestID" UniqueName="column112" Visible="False"></telerik:GridBoundColumn><telerik:GridBoundColumn DataField="Question_ID" FilterControlAltText="Filter column column"
                                        HeaderText="QuestID" UniqueName="column2" Visible="False"></telerik:GridBoundColumn><telerik:GridBoundColumn DataField="QuestName" FilterControlAltText="Filter column1 column"
                                        HeaderText="Question" ReadOnly="True" UniqueName="column1"></telerik:GridBoundColumn><telerik:GridDateTimeColumn DataField="Creation_Time_" DataFormatString="{0:dd/MM/yyyy}"
                                        FilterControlAltText="Filter column5 column" HeaderText="Creation" UniqueName="column115"
                                        Visible="False"></telerik:GridDateTimeColumn><telerik:GridNumericColumn DataField="Display_Time" DecimalDigits="2" FilterControlAltText="Filter column6 column"
                                        HeaderText="Display(min)" UniqueName="column116" Visible="False"></telerik:GridNumericColumn><telerik:GridNumericColumn DataField="Change_Time" DecimalDigits="2" FilterControlAltText="Filter column7 column"
                                        HeaderText="Change(min)" UniqueName="column117" Visible="False"></telerik:GridNumericColumn><telerik:GridBoundColumn DataField="Type" FilterControlAltText="Filter column8 column"
                                        HeaderText="Type" ReadOnly="True" UniqueName="column118" Visible="False"></telerik:GridBoundColumn><telerik:GridButtonColumn CommandName="Delete" ButtonType="ImageButton" FilterControlAltText="Filter column column"
                                        Text="Delete" UniqueName="column3"><ItemStyle CssClass="MyImageButton" /></telerik:GridButtonColumn></Columns><EditFormSettings><EditColumn FilterControlAltText="Filter EditCommandColumn column" 
                                        UniqueName="EditCommandColumn1"></EditColumn><EditColumn ButtonType="ImageButton" /></EditFormSettings></MasterTableView><ClientSettings AllowDragToGroup="True" AllowColumnsReorder="True"><Selecting AllowRowSelect="True" /></ClientSettings><FilterMenu EnableImageSprites="False"></FilterMenu></telerik:RadGrid></telerik:RadPane>
                    <telerik:RadSplitBar ID="RadSplitBar1" runat="server"></telerik:RadSplitBar>
                    <telerik:RadPane ID="RadPane2" runat="server" Width="30%"><telerik:RadGrid ID="dgvQuestion" runat="server" AutoGenerateColumns="False" GridLines="None"
                            Skin="Office2007" AllowFilteringByColumn="True" AllowMultiRowSelection="True"
                            AllowPaging="True" AllowSorting="True" ShowGroupPanel="True" OnItemCommand="dgvQuestion_ItemCommand"
                            OnNeedDataSource="dgvQuestion_NeedDataSource"><HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Office2007"></HeaderContextMenu><GroupPanel Text="Drag a column header here to group by"></GroupPanel><MasterTableView PageSize="20" DataKeyNames="ID" CommandItemDisplay="Top"><CommandItemTemplate><div style="padding: 5px 5px;"><asp:LinkButton ID="btnEditSelected" runat="server" CommandName="AddSelected"> <img style="border:0px;vertical-align:middle;" alt="" src="../../Images/AddRecord.gif" /> Add selected </asp:LinkButton></div>&#160;&#160;</CommandItemTemplate><RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"><HeaderStyle Width="20px"></HeaderStyle></RowIndicatorColumn><ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"><HeaderStyle Width="20px"></HeaderStyle></ExpandCollapseColumn><Columns><telerik:GridClientSelectColumn FilterControlAltText="Filter column column" UniqueName="column8"></telerik:GridClientSelectColumn><telerik:GridButtonColumn CommandName="Selected" FilterControlAltText="Filter column column"
                                        Text="Add" UniqueName="column3"></telerik:GridButtonColumn><telerik:GridBoundColumn FilterControlAltText="Filter column1 column" HeaderText="Description"
                                        UniqueName="column1" DataField="Description"></telerik:GridBoundColumn><telerik:GridBoundColumn FilterControlAltText="Filter column2 column" HeaderText="Explanation"
                                        UniqueName="column2" DataField="Explanation" Visible="False"></telerik:GridBoundColumn><telerik:GridBoundColumn FilterControlAltText="Filter column4 column" HeaderText="Type"
                                        UniqueName="column4" DataField="Type"></telerik:GridBoundColumn><telerik:GridBoundColumn DataField="ID" FilterControlAltText="Filter column column"
                                        HeaderText="ID" UniqueName="column6" Visible="False"></telerik:GridBoundColumn><telerik:GridBoundColumn DataField="ANAL_Q0" FilterControlAltText="Filter column7 column"
                                        HeaderText="Product" UniqueName="column7"></telerik:GridBoundColumn><telerik:GridBoundColumn DataField="ANAL_Q1" FilterControlAltText="Filter column column"
                                        HeaderText="Feature" UniqueName="column"></telerik:GridBoundColumn><telerik:GridBoundColumn FilterControlAltText="Filter column5 column" HeaderText="Difficulty"
                                        UniqueName="column5" DataField="Difficulty"></telerik:GridBoundColumn></Columns><EditFormSettings><EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn></EditFormSettings></MasterTableView><ClientSettings AllowDragToGroup="True"><Selecting AllowRowSelect="True" /></ClientSettings><FilterMenu EnableImageSprites="False"></FilterMenu></telerik:RadGrid></telerik:RadPane>
                </telerik:RadSplitter>
            </td>
        </tr>
    </table>
</asp:Content>
